package cn.tedu.spring.config;

import cn.tedu.spring.di.UserDao;
import cn.tedu.spring.file.Database;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author Justin Parker
 * @Date 2024/8/3 0003 10:55
 * @Version 1.0
 */
public class TestSpringConfig {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(SpringConfig.class);

        Database database = context.getBean(Database.class);
        System.out.println(database);

        UserDao userDao = context.getBean(UserDao.class);
        System.out.println(userDao);
    }
}
